<?php
session_cache_expire(999999999);
if (!isset($_SESSION)) {
    session_start();
}
if (!isset($_SESSION['db'])) {
    $addressbrowser = $_SERVER['SERVER_NAME'];
    $temp = explode(".", $addressbrowser);
    $connection = mysql_connect("1.234.53.52", "cam", "5678");
    //$connection = mysql_connect("localhost", "root", "root" ) ;
    mysql_select_db("elihan", $connection);
    mysql_query("set names 'utf8'");
    $selectdatabase = mysql_query("SELECT am.DatabaseName,am.Logo from ac_eli_manager am where am.KeyName='$temp[0]' and am.`Status` = 2");
    $result = mysql_fetch_assoc($selectdatabase);

    $_SESSION['Logo'] = $result['Logo'];

    $_SESSION['db'] = $result['DatabaseName'];
    mysql_close($connection);
}
$database = $_SESSION['db'];
//$s = (string)(microtime(true)*1000);
//include("handle/get_number_list.php");
//$mysqli = new mysqli("1.234.53.52", "cam", "5678","$database");
//$mysqli = new mysqli("localhost", "root", "root","$database");
//$query = mysqli_query($mysqli,"call getTotalDocument($id_employee)");
/* while($row = mysqli_fetch_array($query)){
  $num_re_pending = $row['RePendingDoc'];
  $num_re_not_approve = $row['ReNotApprovedDoc'];
  $num_re_approved= $row['ReApprovedDoc'];

  $num_re_declined = $row['ReDeclinedDoc'];
  $num_re_reference_approved = $row['ReRefApprovedDoc'];
  $num_re_reference_waiting = $row['ReRefWaitingDoc'];
  $num_re_received_metting = $row['ReMeetingDoc'];


  $num_my_sendingDoc=$row['MySendingDoc'];
  $num_my_savedDoc=$row['MySavedDoc'];
  $num_my_approveDoc=$row['MyApproveDoc'];
  $num_my_declinedDoc=$row['MyDeclinedDoc'];
  $num_my_meetingDoc=$row['MyMeetingDoc'];

  $num_bin_re_doc = $row['BinReceiverDoc'];
  $num_bin_se_doc = $row['BinSendingDoc'];
  } */
//RePendingDoc
$sql = "SELECT count(IDTypeDoc) as RePendingDoc   FROM approvedoc a , listapprove b
		WHERE b.IDEmployee = $id_employee
		AND a.IDGroupApprove = b.IDGroupApprove
		AND a.IDTypeDoc  != 11
		AND a.IDStatus  = 2
		AND b.IDStatus  = 1";
//echo $sql."<br>";
$mysql = mysql_query($sql);
$r = mysql_fetch_array($mysql);
$num_re_pending = $r['RePendingDoc'];

//ReNotApprovedDoc
$sql = "SELECT count(IDTypeDoc) as ReNotApprovedDoc FROM approvedoc a , listapprove b 
		WHERE b.IDEmployee = $id_employee 
		AND a.IDGroupApprove = b.IDGroupApprove
		AND a.IDTypeDoc != 11
		AND a.IDStatus = 2
		AND b.IDStatus = 2";
//echo $sql."<br>";
$mysql = mysql_query($sql);
$r = mysql_fetch_array($mysql);
$num_re_not_approve = $r['ReNotApprovedDoc'];

//ReApprovedDoc
$sql = "SELECT count(IDTypeDoc) as ReApprovedDoc  FROM approvedoc a ,listapprove b 
		WHERE b.IDEmployee = $id_employee
		AND a.IDGroupApprove = b.IDGroupApprove
		AND a.IDTypeDoc != 11
		AND a.IDStatus = 1 
		AND b.IDLabel < 1
		AND b.IDStatus = 1";
//echo $sql."<br>";
$mysql = mysql_query($sql);
$r = mysql_fetch_array($mysql);
$num_re_approved = $r['ReApprovedDoc'];

//ReDeclinedDoc
$sql = "SELECT count(IDTypeDoc) as ReDeclinedDoc  FROM approvedoc a , listapprove b 
		WHERE b.IDEmployee = $id_employee
		AND a.IDGroupApprove = b.IDGroupApprove
		AND a.IDTypeDoc != 11
		AND a.IDStatus = 3 
		AND b.IDLabel < 1
		AND b.IDStatus = 3";
//echo $sql."<br>";
$mysql = mysql_query($sql);
$r = mysql_fetch_array($mysql);
$num_re_declined = $r['ReDeclinedDoc'];

//ReRefApprovedDoc
$sql = "SELECT count(IDTypeDoc) as ReRefApprovedDoc  FROM approvedoc p ,list_reference l 
		WHERE l.id_employee = $id_employee
		AND p.IDGroupApprove = l.id_group 
		AND p.IDTypeDoc != 11 
		AND l.IDLabel < 1
		AND l.id_status = 1 GROUP BY p.IDApproveDoc";
//echo $sql."<br>";
$mysql = mysql_query($sql);
//$r=mysql_fetch_array($mysql);
//$num_re_reference_approved = $r['ReRefApprovedDoc'];
$num_re_reference_approved = mysql_num_rows($mysql);
//ReRefWaitingDoc
$sql = "SELECT IDTypeDoc as ReRefWaitingDoc FROM approvedoc p, list_reference l  
		WHERE l.id_employee = $id_employee
		AND p.IDGroupApprove = l.id_group 
		AND p.IDTypeDoc != 11";
if (isset($_SESSION['db']) && $_SESSION['db'] == 'elitech')
    $sql.=" AND (l.id_status = 2 OR l.id_status = 4) GROUP BY p.IDApproveDoc";
else
    $sql.=" AND l.id_status = 2";
//echo $sql."<br>";    
$mysql = mysql_query($sql);
//$r=mysql_fetch_array($mysql);
$num_re_reference_waiting = mysql_num_rows($mysql);

//ReMeetingDoc
$sql = "SELECT count(IDTypeDoc) as ReMeetingDoc  FROM approvedoc a ,listapprove b 
		WHERE b.IDEmployee  = $id_employee
		AND a.IDGroupApprove = b.IDGroupApprove
		AND a.IDTypeDoc = 11
		AND a.IDStatus = 2
		AND b.IDStatus = 2";
//echo $sql;
$mysql = mysql_query($sql);
$r = mysql_fetch_array($mysql);
$num_re_received_metting = $r['ReMeetingDoc'];

//MySendingDoc
$sql = "SELECT count(IDTypeDoc) as MySendingDoc from approvedoc a
		WHERE a.IDStatus = 2
		AND a.IDEmployee = $id_employee
		AND a.IDTypeDoc != 11";
$mysql = mysql_query($sql);
$r = mysql_fetch_array($mysql);
$num_my_sendingDoc = $r['MySendingDoc'];
//echo $sql."<br>"; 
//MySavedDoc
$sql = "SELECT count(IDTypeDoc) as MySavedDoc from approvedoc a
		WHERE a.IDStatus = 4
		AND a.IDEmployee = $id_employee";
$mysql = mysql_query($sql);
$r = mysql_fetch_array($mysql);
$num_my_savedDoc = $r['MySavedDoc'];
//echo $sql."<br>"; 
//MyApproveDoc
$sql = "SELECT count(IDTypeDoc) as MyApproveDoc from approvedoc a
		WHERE a.IDStatus = 1 
		AND a.IDLabel < 1
		AND a.IDEmployee = $id_employee";
$mysql = mysql_query($sql);
$r = mysql_fetch_array($mysql);
$num_my_approveDoc = $r['MyApproveDoc'];
//echo $sql."<br>"; 
//MyDeclinedDoc
$sql = "SELECT count(IDTypeDoc) as MyDeclinedDoc from approvedoc a
		WHERE a.IDStatus = 3 
		AND a.IDLabel < 1
		AND a.IDEmployee = $id_employee";
//echo $sql;
$mysql = mysql_query($sql);
$r = mysql_fetch_array($mysql);
$num_my_declinedDoc = $r['MyDeclinedDoc'];

//MyMeetingDoc
$sql = "SELECT count(IDTypeDoc) as MyMeetingDoc from approvedoc a
		WHERE a.IDStatus = 2
		AND a.IDTypeDoc = 11
		AND a.IDEmployee = $id_employee";
//echo $sql;
$mysql = mysql_query($sql);
$r = mysql_fetch_array($mysql);
$num_my_meetingDoc = $r['MyMeetingDoc'];

//BinReceiverDoc
$sql = "SELECT count(IDTypeDoc) as BinReceiverDoc  FROM approvedoc a ,listapprove b  
		WHERE b.IDEmployee = $id_employee
		AND a.IDGroupApprove = b.IDGroupApprove
		AND a.IDTypeDoc != 11
		AND a.IDStatus = 6
		AND b.IDStatus = 1";
$mysql = mysql_query($sql);
$r = mysql_fetch_array($mysql);
$num_bin_re_doc = $r['BinReceiverDoc'];
//echo $sql."<br>"; 
//BinSendingDoc
$sql = "SELECT count(IDTypeDoc) as BinSendingDoc from approvedoc a
		WHERE a.IDStatus = 6
		AND a.IDEmployee = $id_employee";
$mysql = mysql_query($sql);
$r = mysql_fetch_array($mysql);
$num_bin_se_doc = $r['BinSendingDoc'];
//echo $sql."<br>"; 


$query1 = mysql_query("SELECT p.IDProject, p.NameProject, p.Description, p.DateStart, p.DateComplete, p.IDManager, p.Status
 FROM pr_project p,pr_composition c, employee e  WHERE ((c.IDEmployee = '$id_employee'  AND e.IDEmployee = c.IDEmployee) or (p.IDManager='$id_employee' and e.IDEmployee=p.IDManager)) AND p.IDProject = c.IDProject GROUP BY p.IDProject ORDER BY p.NameProject ASC");

/* mysql_query("UPDATE listapprove SET IDLabel = IDStatus WHERE IDStatus > 10");
  mysql_query("UPDATE listapprove SET IDStatus=1 WHERE IDStatus > 10"); */

$sql = "SELECT l.IDLable,l.LableName,
(SELECT COUNT(*) FROM approvedoc a WHERE a.IDLabel=l.IDLable) as slApprove,
(SELECT COUNT(*) FROM listapprove la,approvedoc a WHERE la.IDLabel=l.IDLable AND a.IDGroupApprove=la.IDGroupApprove AND la.IDEmployee='$id_employee') as slgApprove,
(SELECT COUNT(*) FROM list_reference lr,approvedoc a WHERE lr.IDLabel=l.IDLable AND a.IDGroupApprove=lr.id_group AND lr.id_employee='$id_employee') as slreference
FROM list_lable l WHERE l.IDEmployee='$id_employee';";
$manglibrary = mysql_query($sql);

/*$sql = "SELECT b.isView
		 	FROM approvedoc a ,listapprove b , employee e
			WHERE b.IDEmployee = '$id_employee' AND a.IDTypeDoc != 11 AND a.IDStatus= 2 AND b.IDStatus= 2 AND a.IDGroupApprove = b.IDGroupApprove AND a.IDEmployee = e.IDEmployee  AND b.isView=0"; //AND b.DateApprove >(CURDATE() - INTERVAL 30 DAY)";
$notappmysql = mysql_query($sql);*/
/*$sql = "SELECT a.isView
			FROM approvedoc a,employee e 
			WHERE a.IDEmployee=e.IDEmployee  and a.IDLabel<1 AND a.IDEmployee='$id_employee' AND a.IDStatus=1 AND a.isView=0 "; //AND a.TimeApprove >(CURDATE() - INTERVAL 30 DAY)";
$myappmysql = mysql_query($sql);*/
/*$sql = "SELECT a.isView
			FROM approvedoc a,employee e 
			WHERE a.IDEmployee=e.IDEmployee AND a.IDEmployee='$id_employee' AND a.IDStatus=3 and  a.IDLabel < 1 AND a.isView=0"; // AND a.TimeApprove >(CURDATE() - INTERVAL 30 DAY)";
$mydecmysql = mysql_query($sql);

$sql = "SELECT b.isView FROM approvedoc a ,list_reference b , employee e 
WHERE b.id_employee = '$id_employee' AND a.IDTypeDoc != 11 
AND b.id_status= 2 AND a.IDGroupApprove = b.id_group AND a.IDEmployee = e.IDEmployee AND b.isView=0"; // AND a.TimeApprove >(CURDATE() - INTERVAL 30 DAY)";
$notrefmysql = mysql_query($sql);*/

//$s1 = (string)(microtime(true)*1000);
//$s2=$s1-$s;
//echo $s1.'-'.$s.'='.$s2;

$mkq=mysql_query("SELECT typedoc.IDTypeDoc,tdn.".$_SESSION['lang']." as tdname,tpn.".$_SESSION['lang']." as tpname from typedoc,staticlang tdn, staticlang tpn,template 
	where typedoc.IDTypeDoc>6 and typedoc.IDTypeDoc!=11 
	and typedoc.IDConfigStaticLang = tdn.IDConfigStaticLang
	and typedoc.IDTemplate = template.IDTemplate 
	and template.IDConfigStaticLang = tpn.IDConfigStaticLang ORDER BY typedoc.IDTypeDoc asc");
$mangdoc=array();
while ($row=mysql_fetch_array($mkq)){
	$mangdoc[]=array($row[IDTypeDoc],$row[tdname]);
}

if (!$_SESSION['menuid']) {
    $_SESSION['menuid'] = array();
}


$menu_arrays = $_SESSION['menuid'];
$menu_contract = array_search("contract", $menu_arrays, true);
$menu_pri = array_search("pri", $menu_arrays, true);
$menu_acc = array_search("acc", $menu_arrays, true);
$menu_app = array_search("app", $menu_arrays, true);
$menu_pri1 = array_search("pri1", $menu_arrays, true);
$menu_pri2 = array_search("pri2", $menu_arrays, true);
$menu_pro = array_search("pro", $menu_arrays, true);
$menu_em = array_search("em", $menu_arrays, true);
?>

<script
src="js/jquery.treeview.js" type="text/javascript"></script>
<script type="text/javascript">
    function menuEffect(ele){
        if($(ele).find('div:last').hasClass('collapsable-hitarea')){
            ajaxMenu('hide', $(ele).find('div:last').attr('id'));
            $(ele).find('div:last').removeClass('collapsable-hitarea');
            $(ele).find('div:last').addClass('expandable-hitarea');					
            $(ele).parent().find('ul:first').toggle();
        }else{
            ajaxMenu('show', $(ele).find('div:last').attr('id'));
            $(ele).find('div:last').removeClass('expandable-hitarea');
            $(ele).find('div:last').addClass('collapsable-hitarea');
            $(ele).parent().find('ul:first').toggle();
        }
    }
    function ajaxMenu(action,menuid){
        $.ajax({url:"ajax/ajaxmenu.php", data : {actions : action , menuid : menuid}});
    }
		
</script>

<link rel="stylesheet" type="text/css" href="css/menu.css" />

<script type="text/javascript">
    function addLable1(flagaction,content,idem)
    {
        var newname=encodeURIComponent(document.getElementById("vlNameLabel1").value);
        if (newname=="") { alert("Null rồi"); return;}
        if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp=new XMLHttpRequest();
        }else{// code for IE6, IE5
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function(){
            if (xmlhttp.readyState==4 && xmlhttp.status==200){
                document.getElementById("idlistLi").innerHTML=xmlhttp.responseText;
                /*$.ajax({url:"/ERP/ERP-PC/ajax/list/move_menu_left_library.php?lang="+lang+"&idem="+idem,success:function(result){
                                                                                                        //alert(result);
                                                                                                        $("#idlistLi").html(result);
                                                                                            }});*/
                //popuploadbel();
            }
        }
        xmlhttp.open("GET","ajax/process_all_li.php?idem="+idem+"&content="+content+"&flagaction="+flagaction+"&lablename="+newname,true);
        xmlhttp.send();
    }

    function deleteLable(flagaction,idem,content)
    {
        var name=document.getElementById("vlNameLabel2").value;
        var id=document.getElementById("vlIDLabel2").value;
        var soluong=document.getElementById("vlSoluong2").value;
        if (soluong>0) { alert("Lable đang chứa dữ liệu"); return;}
        if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp=new XMLHttpRequest();
        }else{// code for IE6, IE5
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function(){
            if (xmlhttp.readyState==4 && xmlhttp.status==200){
                document.getElementById("idlistLi").innerHTML=xmlhttp.responseText;
                /*$.ajax({url:"ajax/list/move_menu_left_library.php?lang="+lang+"&idem="+idem,success:function(result){
                                                                                                        //alert(result);
                                                                                                        $("#idlistLi").html(result);
                                                                                            }});*/
                //popuploadbel();
            }

        }
        hoi= confirm("<?php echo $l_areyousure; ?>");
        if (hoi==true) {
            xmlhttp.open("GET","ajax/process_all_li.php?idem="+idem+"&content="+content+"&flagaction="+flagaction+"&lableid="+id+"&lablename="+name,true);
            xmlhttp.send();
        }
    }

    function editLable(flagaction,idem,content)
    {
        var name=document.getElementById("vlNameLabel2").value;
        var id=document.getElementById("vlIDLabel2").value;
        if (name=="") { alert("Null rồi"); return;}
        if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp=new XMLHttpRequest();
        }else{// code for IE6, IE5
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function(){
            if (xmlhttp.readyState==4 && xmlhttp.status==200){
                document.getElementById("idlistLi").innerHTML=xmlhttp.responseText;
                /*$.ajax({url:"ajax/list/move_menu_left_library.php?lang="+lang+"&idem="+idem,success:function(result){
                                                                                                        //alert(result);
                                                                                                        $("#idlistLi").html(result);
                                                                                            }});*/
                //popuploadbel();
            }
        }
        xmlhttp.open("GET","ajax/process_all_li.php?idem="+idem+"&content="+content+"&flagaction="+flagaction+"&lableid="+id+"&lablename="+name,true);
        xmlhttp.send();
	
    }



    function getresult(namelabel,idlabel,soluong,ele){
        popuploadbel(ele);
        //alert(namelabel+" - "+idlabel+" - "+soluong);
	
        //var left = (screen.width/2)-(350/2);
        //var top = (screen.height/2)-(350/2);
        //return window.open(#popup_name2, 'trời ơi', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
        document.getElementById("vlNameLabel2").value=namelabel;
        document.getElementById("vlIDLabel2").value=idlabel;
        document.getElementById("vlSoluong2").value=soluong;
		
    }

    function xoainput(ele){
        popuploadbel(ele);
        document.getElementById("vlNameLabel1").value="";
	
    }
    function showMenu(status){
    	if(status==1){
        	if(document.getElementById('menucontents1').getAttribute('style')=='display:none;')
				document.getElementById('menucontents1').setAttribute('style','display:block;');
			else
				document.getElementById('menucontents1').setAttribute('style','display:none;');
    	}else{
    		if(document.getElementById('menucontents2').getAttribute('style')=='display:none;')
				document.getElementById('menucontents2').setAttribute('style','display:block;');
			else
				document.getElementById('menucontents2').setAttribute('style','display:none;');
    	}
    }
</script>
<style>
    * {
        font-family: verdana;
    }

    #fade { /*--Transparent background layer--*/
        display: none; /*--hidden by default--*/
        /*background: #000;*/
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        opacity: .80;
        z-index: 9999;
    }

    .popup_block {
        display: none; /*--hidden by default--*/
        background: #fff;
        border: 1px solid silver;
        float: left;
        font-size: 1.2em;
        position: fixed;
        top: 50%;
        left: 50%;
        z-index: 99999;
        /*--CSS3 Box Shadows--*/
        /*--CSS3 Rounded Corners--*/
    }

    .btn_close {
        float: right;
        margin: 5px 5px 0 0;
        color: white;
        font-weight: bold;
    }
    /*--Making IE6 Understand Fixed Positioning--*/
    * html #fade {
        position: absolute;
    }

    * html .popup_block {
        position: absolute;
    }

    .btnupbg {
        background: #309dcf;
        border-radius: 3px;
        color: white;
        cursor: pointer;
        font-weight: bold;
        height: 25px;
        padding: 0 5px 0;
        border-color: #C4C0B9;
        border-width: 1px;
        margin-right: 5px
    }

    .btnupbg:hover {
        background: #686868
    }

    .btnupload {
        background: -moz-linear-gradient(center top, #63B6DB, #309DCF) repeat;
    }
</style>

<div id="menuvar" >
    <div id="sidetree" style="width:<?php if($_SESSION['lang']=="KR") echo '210px'; else echo '300px';?>">

        <ul id="tree" class="treeview">
            <li class="roots"><img src="images/icon_23_03.png" alt="" /><span> <a
                        class="huyngo" style="color: white; font-weight: bold;"
                        href="home.php"><?= $l_home ?> </a> </span><img alt="" style="width: 27px;float: right;padding-right: 2px;margin-top: -6px" src="images/tag.png" onclick="window.location.assign('operations/set_ngang.php');"></li>
            <li class="roots"><img src="images/index_39.png" alt="" /><span> <a class="huyngo" style="color: white;font-weight: bold;"
                                                                                href="companyprofile.php"><?= $l_menu_companyprofile ?> </a>
                </span></li>
            <li class="roots" style="padding-top: 0 !important">
                <div style="padding:5px 0px 1px 0px"  onclick="menuEffect(this)" onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='default'">
                    <div style="width:200px"><img src="images/index_39.png" alt="" /><span id="luan"><?= $l_menu_privateinfo ?>
                        </span></div><div id="pri" style="margin-top:-20px;" class="hitarea roots-hitarea <?php if ($menu_pri > -1) {
    echo 'collapsable-hitarea';
} else {
    echo 'expandable-hitarea';
} ?>"></div>
                </div>
                <ul style="clear:both;display: <?php if ($menu_pri > -1) {
    echo 'block';
} else {
    echo 'none';
} ?>">
                    <li><img src="images/index_25.gif" alt="" /><a
                            href="yourProfile.php"><?= $l_viewprofile ?> </a>
                    </li>
                    <li><img src="images/index_25.gif" alt="" /><a
                            href="logHistory.php"><?= $l_loginhistory ?> </a>
                    </li>
            <?php if ($_SESSION['db'] == 'elitech') { ?>
                        <li class="last"><img src="images/index_25.gif" alt="" /><a
                                href="us_sa.php?content=us_sa_spreadworking_content"><?= $l_working_spreadsheet ?> </a>
                        </li>
                        <li><img src="images/index_25.gif" alt="" /><a
                                                href="salary.php?content=employee_salary"><?= $l_employee_salaries ?> </a></li>
<?php } ?>
                </ul>
            </li>
<?php
if (isset($_SESSION['ketoan'])) {
    if ($_SESSION['ketoan'] == 1) {
        ?>
                    <li class="roots" style="padding-top: 0 !important">
                        <div style="padding:5px 0px 1px 0px" onclick="menuEffect(this)" onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='default'">
                            <div><img src="images/index_06.png" alt="" /><span id="luan" ><?php echo $l_accountant; ?>
                                </span></div><div id="acc" style="margin-top:-20px;"  class="hitarea roots-hitarea <?php if ($menu_acc > -1) {
                        echo 'collapsable-hitarea';
                    } else {
                        echo 'expandable-hitarea';
                    } ?>"></div>
                        </div>
                        <ul style="display: <?php if ($menu_acc > -1) {
                        echo 'block';
                    } else {
                        echo 'none';
                    } ?>">
                            <?php
                            if ($_SESSION['db'] == 'elitech' || $_SESSION['db'] == 'elihan') {
                                ?>
                                <li><img src="images/index_25.gif" alt="" /><span><?php echo $l_Invoice_thu; ?></span>
                                    <ul>
                                        <li><span><img src="images/index_25.gif" alt="" /><a href="accountant-search.php?content=ac_elisoft_order_tax_content&status=0"><?= $l_invoice_tax ?>
                                                </a> </span>
                                        </li>
                                        <li class="last"><span><img src="images/index_25.gif" alt="" /><a href="accountant-search.php?content=ac_elisoft_search_order_tax_content&status=0"><?= $l_search_invoice_tax ?>
                                                </a> </span>
                                        </li>
                                    </ul>
                                </li>	
            <?php
        }
        
        ?>
                            <li><img src="images/index_25.gif" alt="" /><span><?php echo $l_Invoice_chi; ?></span>
                                <ul>
                                    <li><span><img src="images/index_25.gif" alt="" /><a href="accountant-search.php?content=ac_elisoft_order_tax_content&status=1"><?= $l_invoice_tax ?>
                                            </a> </span>
                                    </li>
                                    <li class="last"><span><img src="images/index_25.gif" alt="" /><a href="accountant-search.php?content=ac_elisoft_search_order_tax_content&status=1"><?= $l_SearchPurchase ?>
                                            </a> </span>
                                    </li>
                                </ul>
                            </li>
                            <li><img src="images/index_25.gif" alt="" /><a href="payment.php?content=ac_elisoft_order_tax_content" style="font-weight: bold;"><span><?php echo $l_payment; ?></span></a>
                                    <!-- <ul>
                                        <li><span><img src="images/index_25.gif" alt="" /><a href="payment.php?content=ac_elisoft_order_tax_content"><?= $l_in_payment ?>
                                                </a> </span>
                                        </li>
                                        <li class="last"><span><img src="images/index_25.gif" alt="" /><a href="accountant-search.php?content=ac_elisoft_search_order_tax_content&status=0"><?= $l_search_invoice_tax ?>
                                                </a> </span>
                                        </li> 
                                    </ul>-->
                                </li>
                            <li><img src="images/index_25.gif" alt="" /><span><?php echo $l_contract; ?></span>
                                <ul>
                                    <li><span><img src="images/index_25.gif" alt="" /><a href="contract.php?content=content_addcontract"><?= $l_addcontract ?>
                                            </a> </span>
                                    </li>
                                    <li class="last"><span><img src="images/index_25.gif" alt="" /><a href="contract.php?content=content_listcontract"><?= $l_listcontract ?>
                                            </a> </span>
                                    </li>
                                </ul>
                            </li>
						<li><img src="images/index_25.gif" alt="" /><span><a
							href="search_approve.php" style="font-weight: bold;"><?php echo $l_search_approve; ?>
						</a> </span></li>
                            <li class="last"><img src="images/index_25.gif" alt="" /><span><a href="pay.php" style="font-weight: bold;"><?php echo $l_pay_calendar; ?></a></span></li>

					

					<!--<?php
        
        if ($_SESSION['db'] == 'elitech') {
            ?>
                                <li><img src="images/index_25.gif" alt="" /><span><a href="manage_money.php" style="font-weight: bold;"><?= $l_manageMoney ?></a></span></li>

                                <li class="last"><img src="images/index_25.gif" alt="" /><span><?php echo $l_ml_tinh_luong; ?></span>
                                    <ul>
                                        <li><img src="images/index_25.gif" alt="" /><a
                                                href="content_salary/salary_menu.php?content=import_checktime"><?= $l_ml_import_datatime ?> </a>
                                        </li>
                                        <li ><img src="images/index_25.gif" alt="" /><a
                                                href="content_salary/salary_menu.php?content=working_spreadsheet"><?= $l_working_spreadsheet ?> </a>
                                        </li>
                                        <li><img src="images/index_25.gif" alt="" /><a
                                                href="salary.php?content=employee_salaries"><?= $l_employee_salaries ?> </a>
                                        </li>
                                        <li  ><img src="images/index_25.gif" alt="" /><a href="salary.php?content=sa_search_salary"><?= $l_search_salary ?></a> 
                                        </li>	
                                        <li class="last"><img src="images/index_25.gif" alt="" /><span><?php echo $l_setup_regulation; ?>
                                            </span>
                                            <ul>
                                                <li><span><img src="images/index_25.gif" alt="" /><a
                                                            href="salary.php?content=genera_allowance"><?= $l_general_allowance ?></a>
                                                    </span></li>
                                                <li><span><img src="images/index_25.gif" alt="" /><a
                                                            href="salary.php?content=allowance_hard_holiday"><?= $l_allowance_hard_holiday ?></a>
                                                    </span></li>
                                                <li  class="last"><span><img src="images/index_25.gif" alt="" /><a
                                                            href="salary.php?content=regulation_salary"><?= $l_regulation_salary ?></a>
                                                    </span></li>
                                            </ul>
                                        </li>
                                    </ul>
                                </li>
        <?php } ?>-->


                        </ul>
                    </li>

        <?php
    }
}
?>

<li class="roots" style="padding-top: 0 !important">
                <div style="padding:5px 0px 1px 0px"  onclick="menuEffect(this)" onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='default'">
                    <div style="width:200px"><img src="images/index_06.png" alt="" /><span id="luan"><?= $l_contract ?>
                        </span></div><div id="contract" style="margin-top:-20px;" class="hitarea roots-hitarea <?php if ($menu_contract > -1) {
    echo 'collapsable-hitarea';
} else {
    echo 'expandable-hitarea';
} ?>"></div>
                </div>
                <ul style="clear:both;display: <?php if ($menu_contract > -1) {
			    echo 'block';
			} else {
			    echo 'none';
			} ?>">
                    <li><img src="images/index_25.gif" alt="" /><a href="contract.php?content=content_listcontract"><?= $l_listcontract ?></a></li>
                    <li class="last"><img src="images/index_25.gif" alt="" /><a href="contract.php?content=content_listcontractwarranty"><?=$l_listcontractwarranty ?></a></li>
                </ul>
            </li>

 <?php

if (isset($_SESSION['ketoan'])) {
    if ($_SESSION['ketoan'] == 1) {
    
        if ($_SESSION['db'] == 'elitech') {
            ?>
			<li class="roots" style="background-color: #d7d9dd;padding-top: 0 !important">
            <div style="padding:5px 0px 1px 0px" onclick="menuEffect(this)" onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='default'">
                    <div><img src="images/index_39.png" alt="" /><span><?php echo $l_ml_tinh_luong; ?>

                        </span></div><div id="pri2" style="margin-top:-20px;" class="hitarea roots-hitarea <?php if ($menu_pri2 > -1) {
                                echo 'collapsable-hitarea';
                            } else {
                                echo 'expandable-hitarea';
                            } ?>"></div>
                </div>
                 <ul style="display: <?php if ($menu_pri2 > -1) {
	                echo 'block';
	            } else {
	                echo 'none';
	            } ?>">

                                        <li><img src="images/index_25.gif" alt="" /><a
                                                href="content_salary/salary_menu.php?content=import_checktime"><?= $l_ml_import_datatime ?> </a>
                                        </li>
                                        <li ><img src="images/index_25.gif" alt="" /><a
                                                href="content_salary/salary_menu.php?content=working_spreadsheet"><?= $l_working_spreadsheet ?> </a>
                                        </li>
                                        <li><img src="images/index_25.gif" alt="" /><a
                                                href="salary.php?content=employee_salaries"><?= $l_employee_salaries ?> </a>
                                        </li>
                                        <li  ><img src="images/index_25.gif" alt="" /><a href="salary.php?content=sa_search_salary"><?= $l_search_salary ?></a> 
                                        </li>	
                                        <li class="last"><img src="images/index_25.gif" alt="" /><span><?php echo $l_setup_regulation; ?>
                                            </span>
                                            <ul>
                                                <li><span><img src="images/index_25.gif" alt="" /><a
                                                            href="salary.php?content=genera_allowance"><?= $l_general_allowance ?></a>
                                                    </span></li>
                                                <li><span><img src="images/index_25.gif" alt="" /><a
                                                            href="salary.php?content=allowance_hard_holiday"><?= $l_allowance_hard_holiday ?></a>
                                                    </span></li>
                                                <li  class="last"><span><img src="images/index_25.gif" alt="" /><a
                                                            href="salary.php?content=regulation_salary"><?= $l_regulation_salary ?></a>
                                                    </span></li>
                                            </ul>
                                        </li>
                                   
                                
	             </ul>
      
            </li>
            <?php }}}?>
            
            <li class="roots"><img src="images/index_08.png" alt="" /><span><a class="huyngo" href="manage_assets.php" style="color: white;font-weight: bold;"><?php echo $l_manage_assets; ?></a></span></li>
            <li class="roots" style="padding-top: 0 !important">
                <div style="padding:5px 0px 1px 0px"  onclick="menuEffect(this)" onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='default'">
                    <div><img src="images/index_11.png" alt="" /><span><?php echo $l_e_approval; ?>
                        </span></div><div id="app" style="margin-top:-20px;" class="hitarea roots-hitarea <?php if ($menu_app > -1) {
    echo 'collapsable-hitarea';
} else {
    echo 'expandable-hitarea';
} ?> "></div>
                </div>
                <ul style="display: <?php if ($menu_app > -1) {
    echo 'block';
} else {
    echo 'none';
} ?>">
                    <li><img src="images/index_25.gif" alt="" /><a
                            href="ApproveMain"><?php echo $l_main; ?> </a>
                    </li>

                    <li><span><img src="images/index_25.gif" alt="" /><a
                                href="accountant-setup.php?content=accountant-setup-customer-content"><?= $l_menuSetUpCustomer ?>
                            </a> </span>
                    </li>

                    <li><img src="images/index_25.gif" alt="" /><a href="newform"><?php echo $l_newfom; ?>
                        </a>
                    </li>
                    <li><img src="images/index_25.gif" alt="" /><span><?php echo $l_received_document; ?>
                        </span>
                        <ul>
                            <li><span><img src="images/index_25.gif" alt="" /><a
                                        href="received-list-receiver-pending-content"><?= $l_pending_document ?>
										(<label id="num_re_pending"><?= $num_re_pending ?> </label>)</a>
                                </span></li>
                            <li><span><img src="images/index_25.gif" alt="" /><a
                                        href="received-list-receiver-not-approved-content"><?= $l_not_approved_document ?>
										(<label id="num_re_not_approve"> <!--<?php if (mysql_num_rows($notappmysql) == 0) { ?>
                                            <?= $num_re_not_approve ?> <?php } else { ?> <b><?= $num_re_not_approve ?>
                                                </b> <?php } ?> -->
                                           <?= $num_re_not_approve ?>     
                                          </label>)</a> </span></li>
                            <li id="slreapprove"><span><img src="images/index_25.gif" alt="" /><a
                                        href="received-list-receiver-approved-content"><?= $l_approved_document ?>
										(<label id="num_re_approved"><?= $num_re_approved ?> </label>)</a>
                                </span></li>
                            <li id="slredecline"><span><img src="images/index_25.gif" alt="" /><a
                                        href="received-list-receiver-declined-content"><?= $l_declined_document ?>
										(<label id="num_re_declined"><?= $num_re_declined ?> </label>)</a>
                                </span></li>
                            <!-- <li id="slrerefapprove"><span><img src="images/index_25.gif" alt="" /><a
                                                               href="received-list-receiver-reference-approved-content"><?= $l_reference_document_approved ?>
										(<label id="num_re_reference_approved"><?= $num_re_reference_approved ?></label>)</a> </span></li>
							<li><span><img src="images/index_25.gif" alt="" /><a
                                        href="received-list-receiver-reference-waiting-content"><?= $l_reference_document_waiting ?>
										(<label id="num_re_reference_waiting"><?php if (mysql_num_rows($notrefmysql) == 0) { ?>
                                            <?= $num_re_reference_waiting ?> <?php } else { ?> <b><?= $num_re_reference_waiting ?>
                                                </b> <?php } ?>
                                        </label>)</a> </span>
                            </li> -->
                            
                            <li><span onclick="showMenu(1)" style="cursor: pointer;font-weight: normal;" title="EliremoteViewer"><img src="images/index_25.gif" alt="" />
                            <?= $l_reference_document_approved ?>(<label id="num_re_reference_approved"><?= $num_re_reference_approved ?></label>)
                            </span>
	                            <ul id="menucontents1" class="menucontents" <?php if($content=="content/list-receiver-reference-approved-content.php") echo 'style="display:block;"'; else echo 'style="display:none;"';?> >
	                            	<li ><a href="received-list-receiver-reference-approved-content&TypeDoc=0"><?php echo $l_all;?>(<label id="num_re_reference_approved"><?= $num_re_reference_approved ?></label>)</a></li>
	                            	<?php for ($i=0;$i<count($mangdoc);$i++){
	                            		$sql = "SELECT IDTypeDoc as ReRefWaitingDoc FROM approvedoc p, list_reference l  
													WHERE l.id_employee = $id_employee
													AND p.IDGroupApprove = l.id_group 
													AND p.IDTypeDoc = ".$mangdoc[$i][0]."";
											
											    $sql.=" AND l.IDLabel < 1 AND l.id_status = 1  GROUP BY p.IDApproveDoc";
											
											$mysql = mysql_query($sql);
											$count=mysql_num_rows($mysql);
									if($count>0){
	                            	?>
	                                <li ><a href="received-list-receiver-reference-approved-content&TypeDoc=<?php echo $mangdoc[$i][0];?>"><?php echo $mangdoc[$i][1]?>
	                                <?php 
											echo "(".$count.")";
									?>
	                                
	                                
	                                </a></li>
	                                <?php }
	                            	}
	                                ?>
	                            </ul>
                            </li>
                            <li><span onclick="showMenu(2)" style="cursor: pointer;font-weight: normal;" title="EliremoteCall"><img src="images/index_25.gif" alt="" />
                            <?= $l_reference_document_waiting ?>(<label id="num_re_reference_waiting"><?php if (mysql_num_rows($notrefmysql) == 0) { ?>
                                            <?= $num_re_reference_waiting ?> <?php } else { ?> <b><?= $num_re_reference_waiting ?>
                                                </b> <?php } ?>
                                        </label>)
										
                            </span>
	                            <ul id="menucontents2" class="menucontents" <?php if($content=="content/list-receiver-reference-waiting-content.php") echo 'style="display:block;"'; else echo 'style="display:none;"';?>>
	                            	<li ><a href="received-list-receiver-reference-waiting-content&TypeDoc=0"><?php echo $l_all;?>(<label id="num_re_reference_waiting"><?php if (mysql_num_rows($notrefmysql) == 0) { ?>
                                            <?= $num_re_reference_waiting ?> <?php } else { ?> <b><?= $num_re_reference_waiting ?>
                                                </b> <?php } ?>
                                        </label>)</a></li>
	                            	<?php 
	                            	for ($i=0;$i<count($mangdoc);$i++){
	                            			$sql = "SELECT IDTypeDoc as ReRefWaitingDoc FROM approvedoc p, list_reference l  
													WHERE l.id_employee = $id_employee
													AND p.IDGroupApprove = l.id_group 
													AND p.IDTypeDoc = ".$mangdoc[$i][0]."";
											if (isset($_SESSION['db']) && $_SESSION['db'] == 'elitech')
											    $sql.=" AND (l.id_status = 2 OR l.id_status = 4) GROUP BY p.IDApproveDoc";
											else
											    $sql.=" AND l.id_status = 2";
											$mysql = mysql_query($sql);
											$count=mysql_num_rows($mysql);
											
											$sql = "SELECT b.isView FROM approvedoc a ,list_reference b , employee e 
											WHERE b.id_employee = '$id_employee' AND a.IDTypeDoc = ".$mangdoc[$i][0]."
											AND b.id_status= 2 AND a.IDGroupApprove = b.id_group AND a.IDEmployee = e.IDEmployee AND b.isView=0"; // AND a.TimeApprove >(CURDATE() - INTERVAL 30 DAY)";
											$notrefmysql = mysql_query($sql);
	                            	if($count>0){	
	                            		?>
	                                <li ><a href="received-list-receiver-reference-waiting-content&TypeDoc=<?php echo $mangdoc[$i][0];?>"><?php echo $mangdoc[$i][1]?>
	                                <?php 
											
											if (mysql_num_rows($notrefmysql) == 0) 
												echo "(".$count.")";
											else
												echo "(<b>".$count."</b>)";
									?>	
	                                
	                                
	                                </a></li>
	                                <?php }
	                                
	                            	}?>
	                                
	                            </ul>
                            </li>
                            <li class="last"><span><img src="images/index_25.gif" alt="" /><a
                                        href="received-list-receiver-meeting-pending-content"><?= $l_meeting_document ?>
										(<label id="num_re_received_metting"><?= $num_re_received_metting ?>
                                        </label>)</a> </span></li>
                        </ul>
                    </li>
                    <li><img src="images/index_25.gif" alt="" /><span><?php echo $l_my_document; ?>
                        </span>
                        <ul>
                            <li><span><img src="images/index_25.gif" alt="" /><a
                                        href="mydocument-list-mydocument-sending-content"><?= $l_my_sendingDoc ?>
										(<label id="num_my_sendingDoc"><?= $num_my_sendingDoc ?> </label>)</a>
                                </span></li>
                            <li><span><img src="images/index_25.gif" alt="" /><a
                                        href="mydocument-list-mydocument-saved-content"><?= $l_my_savedDoc ?>
										(<label id="num_my_savedDoc"><?= $num_my_savedDoc ?> </label>)</a>
                                </span></li>
                            <li id="slmyapprove"><span><img src="images/index_25.gif" alt="" /><a
                                        href="mydocument-list-mydocument-approved-content"><?= $l_my_approveDoc ?>
										(<label id="num_my_approveDoc"> <!--<?php if (mysql_num_rows($myappmysql) == 0) { ?>
                                            <?= $num_my_approveDoc ?> <?php } else { ?> <b><?= $num_my_approveDoc ?>
                                                </b> <?php } ?> -->
                                                <?=$num_my_approveDoc?>
                                             </label>)</a> </span></li>
                            <li><span><img src="images/index_25.gif" alt="" /><a
                                        href="mydocument-list-mydocument-declined-content"><?= $l_my_declinedDoc ?>
										(<label id="num_my_declinedDoc"> <!--<?php if (mysql_num_rows($mydecmysql) == 0) { ?>
    <?= $num_my_declinedDoc ?> <?php } else { ?> <b><?= $num_my_declinedDoc ?>
                                                </b> <?php } ?>-->
                                                <?= $num_my_declinedDoc ?>
                                                 </label>)</a> </span></li>
                            <li class="last"><span><img src="images/index_25.gif" alt="" /><a
                                        href="mydocument-list-mydocument-meeting-sending-content"><?= $l_my_meetingDoc ?>
										(<label id="num_my_meetingDoc"><?= $num_my_meetingDoc ?> </label>)</a>
                                </span></li>
                        </ul>
                    </li>
                    <li ><img src="images/index_25.gif" alt="" /><span><?php echo $l_re_bin; ?></span>
                        <ul>
                            <li><span><img src="images/index_25.gif" alt="" /><a
                                        href="mybin-list-mybin-recedoc-content"
                                        onclick="onclickajax()"><?= $l_re_document ?> (<label
                                            id="num_bin_re_doc"><?= $num_bin_re_doc ?> </label>)</a> </span>
                            </li>

                            <li><span><img src="images/index_25.gif" alt="" /><a
                                        href="mybin-list-mybin-senddoc-content"><?= $l_se_document ?>
										(<label id="num_bin_send_doc"><?= $num_bin_se_doc ?> </label>)</a>
                                </span></li>

                        </ul>
                    </li>
                    <li class="last"><img src="images/index_25.gif" alt="" /><span><?php echo $l_li_document; ?>
                        </span>
                        <ul>
                            <li><span><img src="images/index_25.gif" alt="" /><a
                                        href="#?w=350" onclick="xoainput(this);" rel="popup_name1"
                                        class="poplight"><?= $l_new_label ?> </a> </span>
                            </li>
                        </ul>
                        <ul id="idlistLi">
                            <!-- <li id="luanajax1">
                                                                            <span><img src="images/index_25.gif" alt="" /><a href="#" id="luanajax" onclick="onclickajax()">My ajax</a> </span>
												</li> -->
                            <?php
                            if (count($manglibrary) > 0) {
                                $vitri = 1;
                                while ($row = mysql_fetch_array($manglibrary)) {
                                    ?>
                                    <li class="last">
                                        <table style="width: 100%; border: 1;">
                                            <tr>
                                                <td><span><img src="images/index_25.gif" alt="" /> <a
                                                            href="library.php?content=list-library-content&liname=<?php echo $row[LableName]; ?>&libraryid=<?php echo $row[IDLable]; ?>"><?php echo $row[LableName] ?>
        <?php
        $soluong = $row[slApprove] + $row[slgApprove] + $row[slreference];
        echo " ( " . $soluong . " )";
        ?> </a> </span> <span style="float: right"><a href="#?w=350"
                                                                                               onclick="getresult('<?= $row[LableName] ?>',<?= $row[IDLable] ?>,<?= $soluong ?>,this);"
                                                                                               rel="popup_name2" class="poplight"><img
                                                                src="images/config.png" alt="" /> </a> </span>
                                                </td>
                                            </tr>
                                        </table>
                                    </li>
        <?php
    }
}
?>

                        </ul>
                    </li>
                </ul>
            </li>

            <li class="roots" style="background-color: #d7d9dd;padding-top: 0 !important">
            <div style="padding:5px 0px 1px 0px" onclick="menuEffect(this)" onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='default'">
                    <div><img src="images/index_39.png" alt="" /><span><?php echo $l_menu_private; ?>

                        </span></div><div id="pri1" style="margin-top:-20px;" class="hitarea roots-hitarea <?php if ($menu_pri1 > -1) {
                                echo 'collapsable-hitarea';
                            } else {
                                echo 'expandable-hitarea';
                            } ?>"></div>
                </div>
                 <ul style="display: <?php if ($menu_pri1 > -1) {
	                echo 'block';
	            } else {
	                echo 'none';
	            } ?>">
	             <li><a href="privatememo.php"><img src="images/index_25.gif" alt="" /><span><?php echo $l_menu_privatememo; ?></span></a></li>
	             <li class="last"><a href="calendar.php"><img src="images/index_25.gif" alt="" /><span><?=$l_work_calendar?></span></a></li>
	             </ul>
            <!--  <span> <?= $l_menu_privatememo ?> </a> </span>-->
            </li>

            <li class="roots"  style="background-color: #d7d9dd;padding-top: 0 !important">
                <div style="padding:5px 0px 1px 0px" onclick="menuEffect(this)" onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='default'">
                    <div><img	src="images/index_43.png" alt="" /><span><?php echo $l_project; ?>

                        </span></div><div id="pro" style="margin-top:-20px;" class="hitarea roots-hitarea <?php if ($menu_pro > -1) {
                                echo 'collapsable-hitarea';
                            } else {
                                echo 'expandable-hitarea';
                            } ?>"></div>
                </div>
                <ul style="display: <?php if ($menu_pro > -1) {
                echo 'block';
            } else {
                echo 'none';
            } ?>">
                    <li class="last"><img src="images/index_25.gif" alt="" /><span><?php echo $l_projectlist; ?>
                        </span>
                        <ul>
<?php
while ($row = mysql_fetch_array($query1)) {
    $idproject = $row[IDProject];
    $nameproject = $row[NameProject];
    ?>


                                <li><span><img src="images/index_25.gif" alt="" /><a
                                            href="project.php?projectDetail=project-detail&id=<?php echo $idproject ?>&status=0" ><?= $nameproject ?>
                                        </a> </span>
                                </li>

<?php } ?>
                        </ul>
                    </li>


                </ul>
            </li>

<?php
if ($_SESSION['db'] == 'elitech') {
    ?>
                <li class="roots" style="background-color: #d7d9dd;padding-top: 0 !important">
                    <div style="padding:5px 0px 1px 0px" onclick="menuEffect(this)" onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='default'">
                        <div><img	src="images/index_39.png" alt="" /><span><?php echo $l_employee; ?>

                            </span></div><div id="em" style="margin-top:-20px;" class="hitarea roots-hitarea <?php if ($menu_em > -1) {
        echo 'collapsable-hitarea';
    } else {
        echo 'expandable-hitarea';
    } ?>"></div>
                    </div>
                    <ul style="display: <?php if ($menu_em > -1) {
        echo 'block';
    } else {
        echo 'none';
    } ?>">

                        <li class="last"><span><img src="images/index_25.gif" alt="" /><a
                                    href="employee-working.php" >Employee's Chart
                                </a> </span>
                        </li>

                    </ul>
                </li>
<?php } ?>
            <li style="display: none;"></li>

        </ul>
    </div>
</div>
<form method="post" id="fleft" name="fleft" action="">
    <div id="popup_name1" class="popup_block">
        <span
            style="background: #424242; color: #FFFFFF; display: block; padding: 5px 0 5px 10px;"><?php echo $l_new_label; ?>
        </span>
        <table width="100%" style="margin: 20px 0">
            <tr>
                <td width="15%"><b><?php echo $l_name; ?> </b></td>
                <td valign="top"><input type="text" id="vlNameLabel1"
                                        name="vlNameLabel1"
                                        style="height: 23px; width: 95%; border: 1px solid #ccc" size="35"
                                        maxlength="50" value="" /></td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <div align="center" style="padding-top: 3px;">
                        <input type="button" class="btnupbg btnupload iclose"
                               style=" font-size: 12px; width: 100px; float: right; margin-right: 13px;"
                               value="<?php echo $l_cancel; ?>" /> <input type="button"
                               onclick="addLable1('newlb','<?php echo $_SESSION['action']; ?>','<?php echo $id_employee; ?>');"
                               style="float: right;  font-size: 12px; width: 100px;"
                               class="btnupbg btnupload iclose" value="<?php echo $l_create; ?>" />

                    </div>
                </td>
            </tr>
        </table>
    </div>

    <div id="popup_name2" class="popup_block">

        <span
            style="background: #424242; color: #FFFFFF; display: block; padding: 5px 0 5px 10px;"><?php echo $l_new_label; ?>
        </span>
        <table width="100%" style="margin: 20px 0">
            <tr>
                <td width="15%"><b><?php echo $l_name; ?> </b></td>
                <td valign="top"><input type="hidden" name="vlIDLabel2"
                                        id="vlIDLabel2" /> <input type="hidden" name="vlSoluong2"
                                        id="vlSoluong2" /> <input type="text" id="vlNameLabel2"
                                        name="vlNameLabel2"
                                        style="height: 23px; width: 95%; border: 1px solid #ccc" size="35"
                                        maxlength="50" /></td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <div align="center" style="padding-top: 3px;">
                        <input type="button" class="btnupbg btnupload iclose"
                               style=" font-size: 12px; width: 87px; float: right; margin-right: 13px;"
                               value="<?php echo $l_cancel; ?>" /> <input type="button"
                               onclick="deleteLable('deletelb','<?php echo $id_employee ?>','<?php echo $_SESSION['action']; ?>');"
                               style="float: center;  font-size: 12px; width: 87px;"
                               class="btnupbg btnupload iclose" value="<?php echo $l_delete; ?>" />
                        <input type="button"
                               onclick="editLable('editlb','<?php echo $id_employee ?>','<?php echo $_SESSION['action']; ?>');"
                               style="float: left;  font-size: 12px; width: 87px; margin-left: 0px;"
                               class="btnupbg btnupload iclose" value="<?php echo $l_edit; ?>" />
                    </div>
                </td>
            </tr>
        </table>
    </div>
</form>
